/**
 * 
 */
package com.lc.dao;

import java.sql.SQLException;
import java.util.Date;
import java.util.List;

/**
 * @author Zhangxiaojie
 *
 */
public interface MyBatisDao<T> {

	/**
	 * 
	 * @param key
	 * @param entity
	 * @return
	 * @throws Exception
	 */
	Integer save(String key, Object entity) throws SQLException;
	
	/**
	 * 
	 * @param key
	 * @param keyword
	 * @return
	 * @throws Exception
	 */
	Integer deleteByKeyword(String key, Object keyword) throws SQLException;
	
	/**
	 * 
	 * @param key
	 * @param entity
	 * @return
	 * @throws Exception
	 */
	Integer update(String key, Object entity) throws SQLException;
	
	/**
	 * 
	 * @param key
	 * @param keyword
	 * @return
	 * @throws Exception
	 */
	T getByKeyword(String key, Object keyword) throws SQLException;
	
	/**
	 * 
	 * @param key
	 * @return
	 * @throws Exception
	 */
	T getByKeyword(String key) throws SQLException;
	
	/**
	 * 
	 * @param key
	 * @return
	 * @throws Exception
	 */
	List<T> getByList(String key) throws SQLException;
	
	/**
	 * 
	 * @param key
	 * @param entity
	 * @return
	 * @throws Exception
	 */
	List<T> getByList(String key, Object entity) throws SQLException;
	
	/**
	 * 
	 * @param key
	 * @param entity
	 * @return
	 * @throws Exception
	 */
	Object getByCallable(String key, Object entity) throws SQLException;
	
	T getByOne(String key, Date date)throws SQLException;
	
	/**
	 * 
	 * @param key
	 * @param entity
	 * @return
	 */
	Object selectList(String key, Object entity);
	
	/**
	 * 
	 * @param key
	 * @return
	 */
	Object selectList(String key);

}
